﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using NETCORE.EF.DBFirst.Models;

namespace NETCORE.EF.DBFirst.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class ValuesController : ControllerBase
    {
        private readonly DBContext DB;
        public ValuesController(DBContext db)
        {
            DB = db;
        }
        [HttpGet]
        public async Task<IActionResult> Get()
        {
            var con = await DB.AlogUserfiles.CountAsync();
            return Ok(con);
        }
    }
}
